import http from './interface'

// 轮播图
export const _banner = (data) => {
    return http.request({
        url: 'pic/getFirstPic',
        method: 'GET',
        data,
        // handle:true
    })
}
// 查询时间段房型列表
export const _getRoomList = (data) => {
    return http.request({
        url: 'ktSyncRoomTypes/list',
        method: 'GET',
        data,
        // handle:true
    })
}
// 轮播图综合
export const _bannerAll = (data) => {
    return http.request({
        url: 'pic/getXiaoMessage',
        method: 'GET',
        data,
        // handle:true
    })
};
// 爆款，尖货
export const _hotStyle = (data) => {
    return http.request({
        url: 'pic/getClassPic',
        method: 'GET',
        data,
        // handle:true
    })
}
// 首页ICON
export const _homeIcon = (data) => {
    return http.request({
        url: 'home/getFirstClass',
        method: 'GET',
        data,
        // handle:true
    })
}
// 秒杀
export const _spike = (data) => {
    return http.request({
        url: 'home/skillGoods',
        method: 'GET',
        data,
        // handle:true
    })
}
// 推荐
export const _recommend = (data) => {
    return http.request({
        url: 'home/ClassifyProduct',
        method: 'GET',
        data,
        // handle:true
    })
}

/*分类*/
export const _category = (data) => {
    return http.request({
        url: 'home/getAllClass',
        method: 'GET',
        data,
        // handle:true
    })
}

/*小程序分类*/
export const _getXiaoAllClass = (data) => {
    return http.request({
        url: 'home/getXiaoAllClass',
        method: 'GET',
        data,
        // handle:true
    })
}

/*分类的列表二级分类*/
export const _productCate = (data) => {
    return http.request({
        url: 'pms/secondLevelProduct',
        method: 'GET',
        data,
        // handle:true
    })
}
/*分类的列表一级分类*/
export const _productCateFirst = (data) => {
    return http.request({
        url: 'pms/firstLevelProduct',
        method: 'POST',
        data,
        // handle:true
    })
}
/*分类的列表一级分类-热卖、专题*/
export const _productOther = (data) => {
    return http.request({
        url: 'pic/getXiaoOtherList',
        method: 'GET',
        data,
        // handle:true
    })
}
/*商品详情*/
export const _productDetail = (data) => {
    return http.request({
        url: 'pms/goods/detail',
        method: 'GET',
        data,
        // handle:true
    })
}
/*商品详情--带评论*/
export const _productDetails = (data) => {
    return http.request({
        url: 'pms/goods/productDetail',
        method: 'GET',
        data,
        // handle:true
    })
}
/*商品详情*/
export const _productAppraise = (data) => {
    return http.request({
        url: 'pms/goods/CommentDetail',
        method: 'GET',
        data,
        // handle:true
    })
}

// 默认全部导出  import api from '@/common/vmeitime-http/'
export default {
    _banner,
    _hotStyle,
    _homeIcon,
    _spike,
    _recommend,
    _productCate,
    _productDetail
}